<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

		<h:head>
    <title>#{labels.login_title}</title>
    <h:outputStylesheet library="css" name="estilos.css" />
  </h:head>

  <h:body>
    
    <h:form>
      
      <p:panel id="loginPanel" style="margin: 0px auto; vertical-align: top; 
               width: 500px; margin-top: 300px;" >
        
        <p:panelGrid columns="2" id="loginFieldsPanel" style="width: 450px; 
                     margin: 0 auto; vertical-align: central">
          
          <h:outputLabel value="#{labels.login_usename}" />
          <p:inputText value="#{mBLogin.user.username}" id="usrname" />
          <h:outputLabel value="#{labels.login_passwd}" />
          <p:password value="#{mBLogin.user.password}" id="passwd" />
        
        </p:panelGrid>
        
        <p:panelGrid columns="3" id="loginActionPanel" style="width: 450px; 
                     margin: 0 auto; vertical-align: central">
          
          <p:commandButton action="#{mBLogin.doLogin()}" id="actionLogin" 
              value="#{labels.login_action_go}" ajax="false" />
          
          <p:commandButton action="#{mBLogin.cleanFields()}" id="actionClean"
              value="#{labels.login_action_clean}" ajax="true" 
              update="usrname passwd" />
          
          <p:commandButton actionListener="#{mBLanguage.changeLanguage}" 
              id="actionLang" value="#{labels.login_action_change_switch_pt_en}"
              ajax="false" />

        </p:panelGrid>        
      </p:panel>      
    </h:form>    
  </h:body>
		
</html>